let fs = require("fs");
let path = require("path");
let packages = fs.readFileSync(path.join(__dirname, "package.json"), "utf8");
packages = JSON.parse(packages);
let version = packages.version.split(".");
let v0 = version[0];
let v1 = version[1];
let v2 = version[2];
v2 = parseInt(v2) + 1;

packages.version = v0 + "." + v1 + "." + v2;
fs.writeFileSync(
  path.join(__dirname, "package.json"),
  JSON.stringify(packages, null, 4)
);
console.log(`\x1B[32m =========版本更新为${packages.version}======  \x1B[0m`);
